//
//  ByTitleCell.m
//  jmsfhz_ios
//
//  Created by pro on 16/7/19.
//  Copyright © 2016年 pro. All rights reserved.
//

#import "ByTitleCell.h"

@implementation ByTitleCell

+ (instancetype)createCellInTableview:(UITableView *)table {
    
    static NSString *cellIdentifier = @"ByTitleCell";
    ByTitleCell *cell = [table dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) {
        cell = [[self alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
    }
    return cell;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style
              reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
//        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        self.backgroundColor = [UIColor whiteColor];
        [self initSubviews];
    }
    return self;
}

- (void)initSubviews {
    
    /** 喇叭图片 */
    self.lineView = [[UIImageView alloc] initWithFrame:CGRectMake(7.5, 12.5, 3, 15)];
    self.lineView.image = [UIImage imageNamed:@"资讯-竖"];
    [self.contentView addSubview:self.lineView];
    
    /** 内容Label */
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.lineView.right + 5, 5, SCREEN_WIDTH * 0.8, 30)];
    self.titleLabel.textColor = [UIColor blackColor];
    self.titleLabel.font = FONT(16);
    self.titleLabel.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:self.titleLabel];
    self.titleLabel.text = @"这里放标题";
}

@end
